<template>
  <div style="display: inline-block;">
    <label class="radio-label">Book Type: </label>
    <el-select v-model="bookType" style="width:120px;">
      <el-option
        v-for="item in options"
        :key="item"
        :label="item"
        :value="item"
      />
    </el-select>
  </div>
</template>

<script setup>
import { defineEmits, defineProps, reactive, computed } from 'vue'

const props = defineProps({
  modelValue: {
    type: String,
    default: 'xlsx'
  }
})

const options = reactive(['xlsx', 'csv', 'txt'])
const emits = defineEmits(['update:modelValue']);

const bookType = computed({
  get: () => props.modelValue,
  set: val => {
    emits('update:modelValue', val)
  }
})

</script>

<script>
export default {
  name: 'BookTypeOption'
}
</script>
